import instance from "@/utils/axios.js"
import {getToken} from '../../utils/token.js'

// 登录接口
function getLogin({mobile,code}){
    return instance({
        url:'/v1_0/authorizations',
        method:'post',
        data:{
            mobile,
            code
        }
    })
}
export {getLogin}


// 获取个人信息接口

function getUserInfo(){
    return instance({
        url:'/v1_0/user/profile',
        method:'get',
        
    })
}

export{getUserInfo}

// 修改个人信息
function editUserInfo(obj){
    return instance({
        url:'/v1_0/user/profile',
        method:'patch',
        data:obj,
    })
}
export{editUserInfo}


// 修改用户的头像
function editPhoto(fd){
    return instance({
        url:'/v1_0/user/photo',
        method:'patch',
        data:fd,

    })
}
export{editPhoto}
